package org.example.threadlocaltest.demos.enums;
// 统一返回 枚举
public enum UnifiedReturnEnum {

    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    BAD_CREDENTIALS(401, "用户名或密码错误"),
    NO_PERMISSION(403, "无权限"),
    NOT_FOUND(404, "未找到"),
    PARAM_ERROR(400, "参数错误");

    private int code;
    private String msg;

    UnifiedReturnEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
